/*
 * Main.java
 *
 
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ejercicio1;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.util.ArrayList;
import java.util.TreeMap;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
 *
 * @author notebook
 */
public class Main  implements ActionListener, WindowListener{

    private ArrayList localidades= new ArrayList();
    protected Vector personas= new Vector();
    private TreeMap cargos=new TreeMap();
    private java.util.Hashtable puestos= new java.util.Hashtable();
    
    private String nombre;
    
    public void setNombre(String nombre){
        this.nombre=nombre;
    }
    public String getNombre(){
        return nombre;
    }
        
    public void setPersonas(Vector p){
        this.personas=p;
    }
    public Vector getPersonas(){
        return personas;
    }
        
    private JTextField jtf;
    private JTextField jtf1;
    private JLabel jl;
    private JLabel jl1;
    /** Creates a new instance of Main */
    private Main(String[] args) {
        super();
        JFrame jf=new JFrame("Arcapong Tunning");
        jf.setBounds(200,100,300,300);
        jf.getContentPane().setLayout(null);
        jf.addWindowListener(this);
        
        
        jtf = new JTextField();
        jtf.setBounds(100,10,100,20);
        jf.getContentPane().add(jtf);
        
        JButton bo=new JButton("Nombre");
        bo.setBounds(100,40,100,20);
        jf.getContentPane().add(bo);
        bo.addActionListener(this);
        
        jl = new JLabel();
        jl.setBounds(100,70,100,20);
        jf.getContentPane().add(jl);
        jl.setText("alias de Jugador");
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        jtf1 = new JTextField();
        jtf1.setBounds(100,140,100,20);
        jf.getContentPane().add(jtf1);
             
                
         JButton b1=new JButton("ip");
        b1.setBounds(100,100,100,20);
        jf.getContentPane().add(b1);
        b1.addActionListener(this);
        
        jl1 = new JLabel();
        jl1.setBounds(100,170,100,20);
        jf.getContentPane().add(jl1);
        jl1.setText("direccion de ip");
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        jf.setVisible(true);
        
        System.out.println(Math.min(234.456d, 32432));
        
       
        if (args.length==0)
            System.out.println("Hola mundo");
        else
            System.out.println("Hola "+args[0]);
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        
        new Main(args);
        // TODO code application logic here
    }

    public void actionPerformed(ActionEvent e) {
        this.jl.setText(this.jtf.getText());
    }

    public void windowOpened(WindowEvent e) {
    }

    public void windowClosing(WindowEvent e) {
        System.exit(0);
    }

    public void windowClosed(WindowEvent e) {
        System.exit(0);
    }

    public void windowIconified(WindowEvent e) {
    }

    public void windowDeiconified(WindowEvent e) {
    }

    public void windowActivated(WindowEvent e) {
    }

    public void windowDeactivated(WindowEvent e) {
    }
    
}
